package com.geekaca.d2.homework2;

import java.util.Scanner;

public class Work1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("题目1");

        System.out.println("输入父亲身高: ");
        double dadHeight = scanner.nextDouble();

        System.out.println("输入母亲身高: ");
        double momHeight = scanner.nextDouble();

        double sonHeight = (dadHeight + momHeight) * 1.08 / 2;
        System.out.println("儿子的身高为: " + String.format("%.2f", sonHeight) + " cm");

        double daughtHeight = (dadHeight * 0.923 + momHeight) / 2;
        System.out.println("女儿身高为: " + String.format("%.2f", daughtHeight) + " cm");
    }
}
